package com.xiaotu.code.service.blog;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.xiaotu.code.dao.blog.BlogDao;
import com.xiaotu.code.model.blog.Blog;
import com.xiaotu.code.system.DaoException;
import com.xiaotu.code.system.ServiceException;

@Service("blogService")
@Transactional(rollbackFor=Exception.class)
public class BlogServiceImpl implements BlogService{
	@Autowired
	private BlogDao blogDao;

	/**
	 * 检索.
	 */
	@Override
	public List<Blog> queryBlogByKey(String queryKey) throws ServiceException {
		try {
			List<Blog> list=this.blogDao.queryList(queryKey);
			return list;
		} catch (DaoException e) {
			throw new ServiceException(e);
		}
	}
}
